import request from '@/utils/request'

// 查询邮费配置列表
export function listPostage(query) {
  return request({
    url: '/shop/postage/list',
    method: 'get',
    params: query
  })
}

// 查询邮费配置详细
export function getPostage(id) {
  return request({
    url: '/shop/postage/' + id,
    method: 'get'
  })
}

// 新增邮费配置
export function addPostage(data) {
  return request({
    url: '/shop/postage',
    method: 'post',
    data: data
  })
}

// 修改邮费配置
export function updatePostage(data) {
  return request({
    url: '/shop/postage',
    method: 'put',
    data: data
  })
}

// 删除邮费配置
export function delPostage(id) {
  return request({
    url: '/shop/postage/' + id,
    method: 'delete'
  })
}
